package jmine.tec.datadigester.positional.meta;

import java.beans.PropertyDescriptor;
import java.math.BigDecimal;

/**
 * @author lundberg
 */
public class PositionalBigDecimalFieldMetadata extends PositionalFieldMetadata {

    private final int scale;

    /**
     * @param property property
     * @param description description
     * @param start start
     * @param size size
     * @param scale scale
     */
    public PositionalBigDecimalFieldMetadata(PropertyDescriptor property, String description, int start, int size, int scale) {
        super(property, description, start, size);
        this.scale = scale;
    }

    /**
     * @return scale
     */
    public int scale() {
        return this.scale;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected Class<?> getFieldType() {
        return BigDecimal.class;
    }
}
